package com.zeyi.chat.po;

import com.zeyi.chat.dto.Chat;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author zeyi
 */
@Data
@AllArgsConstructor
public class User implements Serializable {
    private static final long serialVersionUID = 5633313288883830512L;
    /**
     * ID
     */
    private Integer id;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 头像URL
     */
    private String avatar;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 个性签名
     */
    private String personalSignature;

    /**
     * 所在地
     */
    private String address;

    private List<Chat> chatList;

    public User(String email, String password) {
        this.email = email;
        this.password = password;
    }

    public User(Integer id, String email, String username, List<Chat> friendList) {
        this.id = id;
        this.email = email;
        this.username = username;
        this.chatList = friendList;
    }

    public User(Integer id, String avatar) {
        this.id = id;
        this.avatar = avatar;
    }
}